<template>
  <div>
    <h3>我的总资产:{{ money }}</h3>
    <div>
      是不是有钱人:<input
        type="checkbox"
        :checked="money > 10000 ? true : false"
      />
    </div>

    <h2>目前状态:{{ money > 10000 ? "有钱" : "没钱" }}</h2>
    <h4>
      消费项目:
      <button @click="fn(60)">洗脚60</button>
      <button @click="fn(100)">吃饭100</button>
      <button @click="fn(1000)">约会1000</button>
      <button @click="fnc(100)">送外卖+100</button>
    </h4>
  </div>
</template>

<script>
export default {
  name: "sys-zy",
  data() {
    return {
        money:10000
    };
  },

  created() {},

  methods: {
    fn(ins){
        this.money -= ins;
    },
    fnc(ins){
        this.money += ins;
    }
  },
};
</script>

<style scoped lang="scss"></style>
